﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AccountManagement
{
    class Account
    {
        double money;
        string name;
        public Account(string name,double money)
        {
            this.name = name;
            this.money = money;
        }
        public double Discount()
        {
            double discount = money * 0.05;
            money = money * 0.95;
            return discount;
        }
        public void Show()
        {
            Console.WriteLine("name = {0}, money = {1}", name, money);
        }

        public string Name
        {
            get
            {
                return name;
            }
        }
        public bool RetrieveMoney(double money)
        {
            if (this.money > money)
            {
                this.money -= money;
                return true;
            }
            else return false;
        }
    }
}
